<?php
$arquivo = Yii::getPathOfAlias('webroot') . "/files" . $model->local;

header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=" . basename($arquivo));
header("Content-Length: " . filesize($arquivo));
header("Accept-Ranges: bytes");
header("Pragma: no-cache");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-transfer-encoding: binary");
readfile($arquivo);
exit;
?>